#include <bits/stdc++.h>
using namespace std;

int n;
int monsters[100000];
int cond[100000];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int killend=0;
    int sum=0;
    int fstmin;
    int scdmin;
    int small=-100000;
    int big=0x3f3f3f;
    int that;//zuixiao
    int theone;//cixiao
    cin>>n;
    for(int i=1; i<=n; i++)
    {
        cin>>monsters[i];
        cond[i]=1;
    }
    sum=n;
    for(int k=1;k<=n;k++){
        if(killend==1){
            break;
        }
        for(int i=1; i<=n; i++)//zuixiao
        {
            if(cond[i]==-1){
                continue;
            }
            if(monsters[i]<big){
                big=monsters[i];
                that=i;
            }
        }
        big=0x3f3f3f3f;
        for(int i=1; i<=n; i++)//cixiao
        {
            if(cond[i]!=1){
                continue;
            }
            if(monsters[i]<big&&monsters[i]!=monsters[that]){
                big=monsters[i];
                theone=i;
            }
        }
        big=0x3f3f3f3f;
        if(monsters[theone]>monsters[that]){
            cond[that]=-1;
            cond[theone]=0;

        }
        that=theone=0;
        for(int i=1; i<=n; i++)
        {
            if(cond[i]!=1){
                killend=1;
            }
            if(cond[i]==1){
                killend=0;
            }

        }

    }
    for(int i=1; i<=n; i++)
    {

        if(cond[i]==-1){
            sum--;
        }
    }
    cout<<sum;
    return 0;
}
